<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252">
	<TITLE></TITLE>
	<META NAME="GENERATOR" CONTENT="OpenOffice.org 2.0  (Win32)">
	<META NAME="CREATED" CONTENT="20061001;13184800">
	<META NAME="CHANGED" CONTENT="20061101;17204700">
	<META NAME="SDFOOTNOTE" CONTENT=";;;;P">
	<META NAME="SDENDNOTE" CONTENT="ARABIC">
	<STYLE>
	<!--
		@page { size: 8.5in 11in; margin-left: 0.85in; margin-right: 0.88in; margin-top: 0.62in; margin-bottom: 0.66in }
		P { margin-bottom: 0in; font-family: "Times New Roman"; font-size: 12pt }
		H1 { margin-left: 0.06in; margin-right: 0.06in; font-family: "Times New Roman"; font-size: 16pt }
		H2 { margin-left: 0.06in; margin-right: 0.06in; font-family: "Times New Roman"; font-size: 14pt; font-style: italic }
		H3 { margin-left: 0.06in; margin-right: 0.06in; font-family: "Times New Roman"; font-size: 13pt }
		BLOCKQUOTE { margin-top: 0.06in; border: 1px solid #dddddd; padding: 0.1in; font-family: "Times New Roman"; font-size: 12pt }
		BLOCKQUOTE.code-western { margin-top: 0in; margin-bottom: 0in; background: transparent; font-family: "Courier New", monospace; font-size: 12pt }
		BLOCKQUOTE.code-cjk { margin-top: 0in; margin-bottom: 0in; background: transparent; font-family: "Times New Roman"; font-size: 12pt }
		BLOCKQUOTE.code-ctl { margin-top: 0in; margin-bottom: 0in; background: transparent; font-family: "Times New Roman"; font-size: 12pt }
	-->
	</STYLE>
</HEAD>
<BODY LANG="en-US" BGCOLOR="#ffffff" DIR="LTR" STYLE="border: none; padding: 0in">
<H3 ALIGN=CENTER><FONT SIZE=6>Babel Guide</FONT></H3>
<P ALIGN=CENTER><BR>
</P>
<P ALIGN=CENTER><BR>
</P>
<H1>Introducing Babel</H1>
<H2>What is Babel? 
</H2>
<P STYLE="margin-bottom: 0.2in">Babel is a knowledge representation
language that aims to be as expressive as most natural language.</P>
<P STYLE="margin-bottom: 0.2in">Babel is modeled after the C family
of computer programming languages which have syntax that provide
terse, human readable and easy to write code. 
</P>
<P STYLE="margin-bottom: 0.2in">Parsing natural language is a hard
problem, but it can be avoided by writing Babel.  By using this
format natural language processing (NLP) can be separated from the
real artificial intelligence work. 
</P>
<P STYLE="margin-bottom: 0.2in">Babel is not a representation of
parsed natural language.  It is designed to represent specific
meaning and does not include many of the subtleties of natural
language.  Babel does not try to model natural language completely. 
The aim is simply to be able to represent the meaning of most natural
language.</P>
<H2>Uses of Babel</H2>
<P STYLE="margin-bottom: 0.2in">The primary use of Babel is a format
for talking to computers.  Babel could allow for an easier Turing
Test to be attempted and may help move beyond the current crude chat
bot designs.  
</P>
<P STYLE="margin-bottom: 0.2in">Babel could be used as a generalized
goal definition system to define objectives for an intelligent agent.
 It could describe problems, potential solutions and actions to be
performed by an agent.  In this regard it could be used for knowledge
representation.</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0.2in"><FONT SIZE=3>Babel
could be of use in translating between natural languages or in other
areas of linguistics.  Learning and using Babel might improve your
grammar since it makes you think about the structure of what you are
saying.</FONT></P>
<H2>Current State of Babel</H2>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0.2in">This is the first
release of Babel.  The language is capable of representing simple
sentences.  More complex sentences may have to be broken into
multiple sentences.  There are still many areas where the language
can be expanded to make it more expressive and easier to use.</P>
<P>The Babel grammar is written in a BNF variant that is used by the
Gold Parsing System (see <A HREF="http://www.devincook.com/goldparser/">http://www.devincook.com/goldparser/</A>).
 The Gold Parser compiles the grammar into tables which can then be
used be loaded by an parsing engine, which have been created for a
variety of different development platforms.  This will help enable
the language to be used on a variety of platforms.  The reference
implementation is written in C# and requires the .Net Framework 2.0
or later to run.</P>
<P><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0.2in">Babel to English
translation is not a hard problem.  Included in the project is a
translator that gives a reasonably understandable equivalent in
English (see <A HREF="http://translator.babelproject.com/">http://translator.babelproject.com/</A>).
Getting the translation to a point where it could pass for human for
Turing Test scenarios may be much more difficult.  The English
translator is very handy for finding mistakes in Babel code and acts
as a check to make sure you said what you meant to.</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0.2in">A parser and the
translator is built into a program imaginatively called Babel Editor.
 The Babel Editor environment provides a view of the parsed result
that shows how Babel is represented as objects in the reference
implementation.  Great care has been taken to keep the parsed object
structures simple.</P>
<P>Babel was created by me, Bryan Livingston.  I also own and operate
<A HREF="http://cooltext.com/">http://cooltext.com</A>.  I'm more of
a computer programmer than a linguist.  I searched long and hard for
a language such as this but found none, so I created Babel over
several years as a side project.</P>
<P><BR>
</P>
<P>Comments and suggestions are welcome on the mailing list at
<A HREF="http://groups.google.com/group/babelproject">http://groups.google.com/group/babelproject</A>.
 The web site for the project is at <A HREF="http://babelproject.com/">http://babelproject.com</A>.</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0.2in"><BR><BR>
</P>
<H1 ALIGN=JUSTIFY STYLE="margin-top: 0in">Learn Babel by Example 
</H1>
<H2>Subject Verb Object Pattern</H2>
<BLOCKQUOTE CLASS="code-western"><SAMP><FONT FACE="Courier New">//
Joe saw Jane. </FONT></SAMP>
</BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western"><SAMP><FONT FACE="Courier New">Joe.see-(Jane);</FONT></SAMP>
</BLOCKQUOTE>
<P STYLE="background: transparent; page-break-before: auto"><BR>
</P>
<P STYLE="background: transparent">Babel is composed of sentences. 
Each sentence ends with a semi-colon.  The &quot;//&quot; mark
indicates a line comment, which means that the text following it will
be ignored by the parser.  Whitespace is ignored by the parser which
means that you could put spaces or line breaks anywhere and it will
still parse the same.</P>
<P STYLE="background: transparent"><BR>
</P>
<P STYLE="background: transparent">Sentences follow a
Subject-Verb-Object pattern.  The subject of the sentence is usually
first.  This is followed by a dot to separate the verb.  Then the
object of the sentence is enclosed in parenthesis.  This follows a
C++, C# or Java pattern of object.method(argument). 
</P>
<P STYLE="background: transparent"><BR>
</P>
<P STYLE="margin-bottom: 0.2in">In natural language we use morphology
to change the sound and spelling of words to indicate things like
plurals and tensing .  In Babel this information is pulled out of the
words and added as special characters.  The past tensing of the verb
&quot;saw&quot; in the example is done with a minus sign attached in
a suffix like manner.    A plus sign is used for future tense words
and if no suffix is present then present tense is assumed for the
verb. 
</P>
<P STYLE="margin-bottom: 0.2in">Nouns are always capitalized. 
Currently there is no way to indicate that a noun a proper noun.  In
spoken English this is specified by the absence of an article (e.g. 
&quot;the&quot;, &quot;a&quot; or &quot;an&quot;.)</P>
<H2>Implicit Subjects and Sentence as an Object</H2>
<BLOCKQUOTE CLASS="code-western"><SAMP><FONT FACE="Courier New">//
See Jane run.</FONT></SAMP></BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western"><SAMP><FONT FACE="Courier New">You.see(Jane.run());
</FONT></SAMP>
</BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western"><SAMP><FONT FACE="Courier New">see(Jane.run());</FONT></SAMP>
</BLOCKQUOTE>
<P STYLE="margin-bottom: 0.2in"><BR><BR>
</P>
<P STYLE="margin-bottom: 0.2in">Whenever the initial subject is left
off, an implicit noun &quot;You&quot; is used as the subject.  The
above sentences are logical equivalents.  In English we often drop
and make implicit the subject of a sentence when it is the person we
are speaking to. 
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0.2in">The object of the
sentence is another sentence.  The object of a sentence can be empty,
a noun, a set of nouns, another sentence, or just an adjective. 
Unlike computer programming languages there is max of only one object
of a sentence.  Information that you would think would be used for
multiple arguments would probably be attached directly to the verb as
a prepositional phrase.</P>
<H2>Adjectives and Adverbs</H2>
<BLOCKQUOTE CLASS="code-western"><SAMP><FONT FACE="Courier New">//
The tall man walked slowly.</FONT></SAMP></BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western"><SAMP><FONT FACE="Courier New">Man
tall.walk- slow();</FONT></SAMP></BLOCKQUOTE>
<P STYLE="margin-bottom: 0.2in"><BR><BR>
</P>
<P STYLE="margin-bottom: 0.2in">In this sentence the adjective &quot;tall&quot;
is attached to the noun &quot;Man&quot; and adverb &quot;slow&quot;
is attached to the verb &quot;Walk&quot;.</P>
<P STYLE="margin-bottom: 0.2in">The suffix &quot;-ly&quot; is dropped
from &ldquo;slowly&rdquo;.  When English is spoken the suffix is used
to indicate that it's an adverb, but in Babel that is made explicit
by the formatting.</P>
<P STYLE="margin-bottom: 0.2in">There is no object of this particular
sentence so the parentheses are left empty.</P>
<H2>Prepositional Phrases and Restrictive Clauses</H2>
<BLOCKQUOTE CLASS="code-western"><SAMP><FONT FACE="Courier New">//
The quick brown fox jumped over the lazy dog.</FONT></SAMP></BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western"><SAMP><FONT FACE="Courier New">Fox
quick brown.jump- over[Dog lazy]();</FONT></SAMP></BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western"><BR>
</BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western"><SAMP><FONT FACE="Courier New">//
The horse that I rode died.</FONT></SAMP></BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western"><SAMP><FONT FACE="Courier New">Horse
that[I.ride-()].die-();</FONT></SAMP></BLOCKQUOTE>
<P STYLE="margin-bottom: 0.2in">  
</P>
<P STYLE="margin-bottom: 0.2in">The prepositional phrase &quot;over
the lazy dog&quot; is attached to the verb &quot;jump&quot;. 
Prepositions are attached as if they were adverbs followed by the
object of the proposition contained in square brackets.</P>
<P STYLE="margin-bottom: 0.2in">Restrictive clauses are handled much
like a prepositional phrase, but they are instead attached to a noun.
</P>
<P STYLE="margin-bottom: 0.2in">In the reference implementation when
these prepositional phrases and restrictive clauses are parsed they
are created as adverb and adjective objects but have the contents of
the brackets attached.</P>
<H2>Declarations</H2>
<BLOCKQUOTE CLASS="code-western">// Joe is tall.</BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western">Joe.is(tall);</BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western">Joe.tall;</BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western"><BR>
</BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western">// Joe was tall.</BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western">Joe.is-(tall);</BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western"><BR>
</BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western">// Joe is a human.</BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western">Joe.Human;</BLOCKQUOTE>
<P STYLE="margin-bottom: 0.2in"><BR><BR>
</P>
<P STYLE="margin-bottom: 0.2in">The top two statements are logically
identical.  When the verb is left off the verb is assumed to be &ldquo;is&rdquo;.</P>
<P STYLE="margin-bottom: 0.2in">Unfortunately there is no shorthand
for was, so in order to express the past tense you have to explicitly
use the &ldquo;is&rdquo; verb with a past tense suffix.</P>
<P STYLE="margin-bottom: 0.2in">When the object in a declaration is a
noun then the sentence is saying that the subject is a subclass of
the object.</P>
<H2>Noun Sets</H2>
<BLOCKQUOTE CLASS="code-western">// Tashonda sent e-mail, cards, and
letters.</BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western">Tashonda.send-(Email &amp; Card* &amp;
Letter*);</BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western"><BR>
</BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western">// Tashonda sent e-mail, cards, or
letters.</BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western">Tashonda.send-(Email | Card* |
Letter*);</BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western"><BR>
</BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western">// Mrs. Doubtfire gave Tabitha and
Samantha quizzes.</BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western">MrsDoubtfire.give- to[Tabitha &amp;
Samantha](Quiz*);</BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western"><BR>
</BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western">// Juanita and Celso worked hard.</BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western">Juanita &amp; Celso.work- hard();</BLOCKQUOTE>
<P STYLE="margin-bottom: 0.2in"><BR><BR>
</P>
<P STYLE="margin-bottom: 0.2in">Anywhere that a noun can be used a
set of nouns can be used instead.  Simply chain them together with
ampersands for an and set and using pipes for or set.   You can not
mix and and or in a single set.</P>
<P STYLE="margin-bottom: 0.2in">Also note that the asterisk is used
as a suffix to specify a plural.</P>
<H2>Gerunds</H2>
<BLOCKQUOTE CLASS="code-western">// I love running.</BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western">I.love(Run=);</BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western"><BR>
</BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western">// Charles is working in the garden.
</BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western">Charles.Work= in[Garden];</BLOCKQUOTE>
<P><BR>
</P>
<P>A gerund is a noun that is built from a verb by attaching an
&ldquo;-ing&rdquo; suffix.  Note that the gerund words are
capitalized since they are nouns.</P>
<P><BR>
</P>
<P>The &ldquo;-ing&rdquo; suffix is also attached to present tense
participles, which are verbs that are used as adjectives, but there
is no support in Babel yet for participles.</P>
<H2>Questions</H2>
<BLOCKQUOTE CLASS="code-western">// Where are you going?</BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western">where(You.are(Go=));</BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western"><BR>
</BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western">// What were you reading this
morning?</BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western">what(You.read- this[Morning]());</BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western"><BR>
</BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western">// May I postpone this assignment?</BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western">may(I.postpone(Assignment));</BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western"><BR>
</BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western">// Is Joe tall?</BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western">is tall(Joe);</BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western"><BR>
</BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western">// Where is Joe?</BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western">where(Joe);</BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western"><BR>
</BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western">// What is the color of horse that I
am riding?</BLOCKQUOTE>
<BLOCKQUOTE CLASS="code-western">what color(Horse
that[I.is-(Ride=)]);</BLOCKQUOTE>
<P STYLE="margin-left: 0.06in; margin-right: 0.06in; margin-top: 0.06in; margin-bottom: 0.06in">
Questions are written with the interrogative word as a verb.</P>
<P STYLE="margin-left: 0.06in; margin-right: 0.06in; margin-top: 0.06in; margin-bottom: 0.06in">
Questions usually use an implicit subject, so a subject of &ldquo;You&rdquo;
is attached to the question when parsed.  Asking a question is
technically giving an order since an answer is being demanded.</P>
<P STYLE="margin-left: 0.06in; margin-right: 0.06in; margin-top: 0.06in; margin-bottom: 0.06in">
Currently the parser is hard coded to recognize specific
interrogatives.  This is less than ideal since it makes the parser
English specific and in the future a symbol may be introduced to
indicate that a statement is a question.</P>
<P STYLE="margin-bottom: 0.2in"><BR><BR>
</P>
<H1>Babel Limitations</H1>
<P>Babel is very much a work in progress.  Below are some of the
areas that may be improved upon.</P>
<H2>Conjunctions</H2>
<P>Most conjunctions are not currently available in the language. 
Complex sentences can not easily be expressed without them.</P>
<H2>Articles</H2>
<P>The language does not support articles (a, an, and the) right now.
 In natural language these are used to indicate that a noun is
proper.  It's questionable whether this information is important
enough be included in the language.</P>
<P><BR>
</P>
<P>If support for articles was added it might take the form of adding
an underscore before or after the noun.  Or the articles could be
added as adjectives, something which could be done right now.</P>
<H2>Questions</H2>
<P STYLE="margin-right: 0.06in; margin-top: 0.06in; margin-bottom: 0.06in">
Currently the parser is hard coded to recognize specific
interrogatives.  This is less than ideal since it makes the parser
English specific and in the future a symbol may be introduced to
indicate that a statement is a question.</P>
<H2>Modifiers</H2>
<P STYLE="margin-bottom: 0.2in">Words that modify an adjective or
adverb (e.g. very, slightly, rather, quite) can not be expressed
properly.  For instance, it is not really possible to say &quot;the
very black dog&quot; since the modifier &quot;very&quot; needs to be
attached to the adjective &quot;black&quot; and not the noun &quot;dog&quot;.</P>
<P STYLE="margin-bottom: 0.2in">Negatives (e.g. The dog that is not
running.) would also need to be attached as a modifier.</P>
<H2>Babel Emitter</H2>
<P STYLE="margin-bottom: 0.2in">If computers are going to be working
with Babel they will need to be able to generate it in object form
and then save it as written Babel code.  This is not a seriously
difficult task and will be part of the reference implementation
someday.</P>
</BODY>
</HTML>